<script>
import { defineComponent } from "vue";
import {pageHandler} from '@/mixins/pageHandler'
import MonitorHeader from "@/components/MonitorHeader/MonitorHeader.vue";
import ScaleBox from "@/components/ScaleBox/ScaleBox.vue";
import YingYaBan from "@/components/controls/YingYaBan.vue";
import NetState from "@/components/controls/netState.vue";
import RuanYaBan from "@/components/controls/RuanYaBan.vue";
import GuangZiPai from "@/components/controls/GuangZiPai.vue";
import BiLeiQi from "@/components/controls/biLeiQi.vue";
import XianQuan from "@/components/controls/xianquan.vue";
import TerminalSvg from "@/components/controls/terminal-svg.vue";
import ConnectLine from "@/components/controls/connect-line.vue";
import RectSvg from "@/components/controls/rect-svg.vue";
import KongZhiBaShou from "@/components/controls/KongZhiBaShou.vue";
import RightClickmenuList from "@/components/rightClickmenuList/rightClickMenuList.vue";
import GuapaiDialog from "@/components/rightClickmenuList/guapaiDialog.vue";
import YaokongDialog from "@/components/rightClickmenuList/yaokongDialog.vue";

export default defineComponent({
  name: "breakPage",
  components: { YaokongDialog, GuapaiDialog, RightClickmenuList, KongZhiBaShou, RectSvg, ConnectLine, TerminalSvg, XianQuan, BiLeiQi, GuangZiPai, RuanYaBan, NetState, YingYaBan, ScaleBox, MonitorHeader },
  mixins:[pageHandler],
  data() {
    return {
      hardPlatenDataList: [],
      flexiblePlatenDataList: [],
      GZPDataList:[],
      netStateList:[],
      singleYaBanList:[],
      signGZPList:[],
      p3_1GZPDataList:[],
      p3_2GZPDataList:[],
      p3_3GZPDataList:[],
      bashouList:[],
    };
  },
  mounted() {

  },
  methods: {
    initData(e){
      this.filterData(e)
    },
    filterData(data) {
      const typeMap = {
        "压板": "hardPlatenDataList",
        "软压板": "flexiblePlatenDataList",
        "光字牌": "GZPDataList",
        "网络状态": "netStateList"
      };

      for (const listName of Object.values(typeMap)) {
        this[listName] = [];
      }
      for (const [key, value] of Object.entries(data)) {
        for (const [type, listName] of Object.entries(typeMap)) {
          const filtered = value.filter(item => item.type === type);
          if (filtered.length > 0) {
            this[listName].push({ name: key, list: filtered });
          }
        }
      }
       this.singleYaBanList=this.hardPlatenDataList.filter(item=> item.name==='压板')
      this.hardPlatenDataList=this.hardPlatenDataList.filter(item=> item.name!=='压板')
      this.signGZPList=this.GZPDataList.filter(item=> item.name.slice(-2)==='信号'&&item.name!=='机构信号')
      this.GZPDataList=this.GZPDataList.filter(item=> item.name.slice(-2)!=='信号'||item.name==='机构信号')
      this.p3_3GZPDataList=this.GZPDataList.filter(item=> item.name.includes('保护')||item.name.includes('电缆'))
      this.p3_2GZPDataList=this.GZPDataList.filter(item=> item.name==='机构信号')
      this.p3_1GZPDataList=this.GZPDataList.filter(item=> !item.name.includes('保护')&&!item.name.includes('电缆')&&item.name!=='机构信号')
      this.bashouList=this.pageData['操作把手']?.filter(item=> item.state_desc!=='智能终端1就地')
    },
  },
  created() {
  }
});
</script>

<template>
  <div class="breaker-graph" @click="cancelLeftClickMenu" @contextmenu.stop="cancelLeftClickMenu" v-if="pageData">
    <ScaleBox :width="2320">
      <MonitorHeader :title="/^220kv/i.test($route.query.ftName || '') ? $route.query.ftName : '220kV' + $route.query.ftName" >
      <template v-slot:btns>
          <button @click="routerToMainPage">主接线图</button>
        <button @click="goMap">画面索引</button>
          <button @click="clearAll($route.query.ftName)">画面清闪</button>
          <button @click="operationRecords">操作记录</button>
        </template>
      </MonitorHeader>
      <main>
        <div class="p1">
          <div class="p1top">
            <div class="p1top1">
              <div class="line-wrapper">
                <svg>
                  <g transform="translate(180,0) scale(1.1)">
                      <polygon points="0,10,5,0,10,10" fill="rgb(128,0,128)" stroke="rgb(128,0,128)" stroke-width="1"></polygon>
                    <line x1="5" y1="10" x2="5" y2="90" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="5" y1="123" x2="5" y2="163" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <bi-lei-qi color="rgb(128,0,128)" :translate-x="-126" :translate-y="-67"></bi-lei-qi>
                    <xian-quan color="rgb(128,0,128)" :translate-x="-126" :translate-y="-47"></xian-quan>
                    <line x1="5" y1="70" x2="15" y2="70" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="5" y1="143" x2="15" y2="143" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <terminal-svg
                      :state="Number(pageData['dd'][2].state_val)"
                      :stateDesc="pageData['dd'][2].state_desc"
                      :name="'-'+pageData['dd'][2].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['dd'][2]"
                      :translate-x="62"
                      :translate-y="52"
                      :text-translate-y="-5"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <connect-line
                      :state="Number(pageData['glg'][0].state_val)"
                      :stateDesc="pageData['glg'][0].state_desc"
                      :name="'-'+pageData['glg'][0].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['glg'][0]"
                      :translate-x="33"
                      :translate-y="92"
                      :text-translate-y="-5"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <terminal-svg
                      :state="Number(pageData['dd'][1].state_val)"
                      :stateDesc="pageData['dd'][1].state_desc"
                      :name="'-'+pageData['dd'][1].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['dd'][1]"
                      :translate-x="62"
                      :translate-y="125"
                      :text-translate-y="-5"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <rect-svg
                      :state="Number(pageData['dlq'][3].state_val)"
                      :stateDesc="pageData['dlq'][3].state_desc"
                      :rotate="90"
                      :translate-y="160"
                      :translate-x="46"
                      :text-translate-x="-2"
                      :text-translate-y="0"
                      :scale="1"
                      :info="pageData.dlq[3]"
                      @itemRightClick="itemRightClick"
                      :itemObj="{is_clear:pageData['dlq'][3].is_clear}"
                      :name="pageData['dlq'][3].state_desc"
                    ></rect-svg>
                    <rect-svg
                      :state="Number(pageData['dlq'][0].state_val)"
                      :stateDesc="pageData['dlq'][0].state_desc"
                      :rotate="90"
                      :translate-y="140"
                      :translate-x="-10"
                      :text-translate-x="-60"
                      :text-translate-y="-6"
                      :scale="0.7"
                      :info="pageData.dlq[0]"
                      :itemObj="{is_clear:pageData['dlq'][0].is_clear}"
                      :name="pageData['dlq'][0].state_desc"
                    ></rect-svg>
                    <rect-svg
                      :state="Number(pageData['dlq'][1].state_val)"
                      :stateDesc="pageData['dlq'][1].state_desc"
                      :rotate="90"
                      :translate-y="170"
                      :translate-x="-10"
                      :text-translate-x="-60"
                      :text-translate-y="-6"
                      :scale="0.7"
                      :info="pageData.dlq[1]"
                      :itemObj="{is_clear:pageData['dlq'][1].is_clear}"
                      :name="pageData['dlq'][1].state_desc"
                    ></rect-svg>
                    <rect-svg
                      :state="Number(pageData['dlq'][2].state_val)"
                      :stateDesc="pageData['dlq'][2].state_desc"
                      :rotate="90"
                      :translate-y="200"
                      :translate-x="-10"
                      :text-translate-x="-60"
                      :text-translate-y="-6"
                      :scale="0.7"
                      :info="pageData.dlq[2]"
                      :itemObj="{is_clear:pageData['dlq'][2].is_clear}"
                      :name="pageData['dlq'][2].state_desc"
                    ></rect-svg>
                    <line x1="5" y1="198" x2="5" y2="238" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="5" y1="218" x2="15" y2="218" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <terminal-svg
                      :state="Number(pageData['dd'][0].state_val)"
                      :stateDesc="pageData['dd'][0].state_desc"
                      :name="'-'+pageData['dd'][0].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['dd'][0]"
                      :translate-x="62"
                      :translate-y="201"
                      :text-translate-y="-5"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <line x1="-25" y1="238" x2="35" y2="238" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="-25" y1="238" x2="-25" y2="258" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="35" y1="238" x2="35" y2="258" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <connect-line
                      :state="Number(pageData['glg'][1].state_val)"
                      :stateDesc="pageData['glg'][1].state_desc"
                      :name="'-'+pageData['glg'][1].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['glg'][1]"
                      :translate-x="3"
                      :translate-y="260"
                      :text-translate-y="-5"
                      :text-translate-x="-40"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <connect-line
                      :state="Number(pageData['glg'][2].state_val)"
                      :stateDesc="pageData['glg'][2].state_desc"
                      :name="'-'+pageData['glg'][2].state_desc.split('-')[1]"
                      :scale=0.7
                      :info="pageData['glg'][2]"
                      :translate-x="63"
                      :translate-y="260"
                      :text-translate-y="-5"
                      :text-translate-x="10"
                      :rotate="90"
                      @itemRightClick="itemRightClick"
                    />
                    <line x1="-25" y1="292" x2="-25" y2="398" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="35" y1="292" x2="35" y2="358" stroke="rgb(128,0,128)" stroke-width="2"></line>
                    <line x1="-120" y1="398" x2="120" y2="398" stroke="rgb(128,0,128)" stroke-width="6"></line>
                    <line x1="-120" y1="358" x2="120" y2="358" stroke="rgb(128,0,128)" stroke-width="6"></line>
                    <circle r="8" cx="-25" cy="398" style="fill:rgb(128,0,128);"/>
                    <circle r="8" cx="35" cy="358" style="fill:rgb(128,0,128);"/>
                    <text x="50" y="390" fill="#a9765e" style="font-size: 1.1rem;font-weight: bolder" >220kV IA母</text>
                    <text x="50" y="350" fill="#a9765e" style="font-size: 1.1rem;font-weight: bolder" >220kV II母</text>
                  </g>
                </svg>
              </div>



              <div class="hard-platen-wrapper" style="width: 100%;margin-left: 28%;margin-top: -12%">
                    <div class="hard-platen-item">
                      <div class="list-item" v-for="(o, i) in singleYaBanList[0].list" :key="i">
                        <div class="list-item-svg" >
                          <YingYaBan :info="o" :state="Number(o.state_val)" :scale="0.7" style="position: absolute;top: -10px"></YingYaBan>
                        </div>
                        <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                      </div>
                    </div>
              </div>
              <div class="control-handle-wrapper">
                <div class="control-handle-grid">
                  <div v-for="(item, index) in bashouList" :key="index" class="control-handle-grid-item">
                    <template v-if="item.isEmpty"></template>
                    <template v-else>
                      <div class="svg-wrapper">
                        <svg>
                          <g v-if="item.state_desc.includes('解锁')">
                            <text x="20" y="15" fill="#FFFFFF" font-size="12px">联锁</text>
                            <text x="60" y="60" fill="#FFFFFF" font-size="12px">解锁</text>
                          </g>
                          <g v-else>
                            <text x="20" y="15" fill="#FFFFFF" font-size="12px">远方</text>
                            <text x="60" y="60" fill="#FFFFFF" font-size="12px">就地</text>
                          </g>
                        </svg>
                        <div class="polygon-icon">
                          <div  class="cursor-pointer" style="cursor: pointer">
                            <KongZhiBaShou style="margin-top: -10px" :info="bashouList[index]" :name="item.state_desc" :state="Number(item.state_val)"  @itemRightClick="itemRightClick" :deviceName="item.state_desc"  :jianGeMing="pageData.glg[1].jg_name"></KongZhiBaShou>
                          </div>
                        </div>
                      </div>
                      <div class="grid-item-name">{{item.state_desc}}</div>
                    </template>
                  </div>
                </div>
              </div>
            </div>
            <div class="p1top2">
              <div class="remote-measurement-wrapper">
                <div class="remote-measurement-table">
                  <table border="3" cellspacing="0">
                    <colgroup>
                      <col style="width: 35%;" />
                      <col style="width: 45%;" />
                      <col style="width: 20%;" />
                    </colgroup>
                    <tbody>
                    <tr v-for="(item, index) in pageData['遥测']" :key="index"   :style="{ backgroundColor: index % 2 === 0 ? 'rgb(36, 104, 176)' : 'rgb(35, 130, 222)' }">
                      <td :style="{color: 'white'}">{{item.state_desc}}</td>
                      <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(item)">{{Number(item.state_val).toFixed(2)}}</td>
                      <td :style="{color: 'white'}">{{item.unit}}</td>
                    </tr>
                    </tbody>
                  </table>
                </div>
              </div>
              <div class="netState-wrapper">
                <div class="netState-list" v-for="item in this.netStateList" content="netStateItem">
                  <div class="netTitle">{{item.name}}</div>
                    <net-state :info="items" :state="items.state_val" v-for="items in item.list"></net-state>
                </div>
              </div>
            </div>
            <div class="p1top3">
              <div class="gzpInner">
                <div v-for="o in signGZPList" class="gzpItem">
                  <div class="gzpTitle">{{o.name}}</div>
                  <div v-for="item in o.list">
                    <GuangZiPai :info="item" :isClear="+item.is_clear" :jianGeMing="pageData.glg[1].jg_name" :name="item.state_desc" :state="Number(item.state_val)"></GuangZiPai>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="p1bottom">
            <div class="hard-platen-wrapper">
              <div class="hard-platen-inner">
                <div class="hard-platen-list">
                  <div class="hard-platen-item">
                    <div class="hard-platen-item-name">{{hardPlatenDataList[0].name}}</div>
                    <div class="list-item" v-for="(o, i) in hardPlatenDataList[0].list" :key="i">
                      <div class="list-item-svg" >
                        <YingYaBan :info="o" :state="Number(o.state_val)" :scale="0.7" style="position: absolute;top: -10px"></YingYaBan>
                      </div>
                      <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="hard-platen-wrapper">
              <div class="hard-platen-inner">
                <div class="hard-platen-list">
                  <div class="hard-platen-item">
                    <div class="hard-platen-item-name">{{hardPlatenDataList[1].name}}</div>
                    <div class="list-item" v-for="(o, i) in hardPlatenDataList[1].list" :key="i">
                      <div class="list-item-svg" >
                        <YingYaBan :info="o" :state="Number(o.state_val)" :scale="0.7" style="position: absolute;top: -10px"></YingYaBan>
                      </div>
                      <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="p2">
          <div class="flexible-platen-wrapper">
            <div class="flexible-platen-inner">
              <div class="flexible-platen-list">
                <div v-for="(item, index) in flexiblePlatenDataList" :key="index" class="flexible-platen-item">
                  <div class="item-name">{{item.name}}</div>
                  <div class="list-item" v-for="(o, i) in item.list" :key="i" @click.prevent.stop="itemRightClick($event, 'ruanyaban', o.state_desc,Number(o.state_val), o.id,o.jg_name,o)">
                    <div class="list-item-svg cursor-pointer">
                      <RuanYaBan :state="Number(o.state_val)" :info="o"></RuanYaBan>
                    </div>
                    <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="p3">
         <div>  <div class="gzpInner">
           <div v-for="o in p3_1GZPDataList" class="gzpItem">
             <div class="gzpTitle">{{o.name}}</div>
             <div v-for="item in o.list">
               <GuangZiPai :set-hei="true" height="7.5" :info="item" :isClear="+item.is_clear" :jianGeMing="pageData.glg[1].jg_name" :name="item.state_desc" :state="Number(item.state_val)"></GuangZiPai>
             </div>
           </div>
         </div></div>
          <div>  <div class="gzpInner">
            <div v-for="o in p3_2GZPDataList" class="gzpItem">
              <div class="gzpTitle">{{o.name}}</div>
              <div v-for="item in o.list">
                <GuangZiPai  :set-hei="true" height="9.75" :info="item" :isClear="+item.is_clear" :jianGeMing="pageData.glg[1].jg_name" :name="item.state_desc" :state="Number(item.state_val)"></GuangZiPai>
              </div>
            </div>
          </div></div>
          <div>  <div class="gzpInner">
            <div v-for="o in p3_3GZPDataList" class="gzpItem">
              <div class="gzpTitle">{{o.name}}</div>
              <div v-for="item in o.list">
                <GuangZiPai :set-hei="true" height="12.5" :info="item" :isClear="+item.is_clear" :jianGeMing="pageData.glg[1].jg_name" :name="item.state_desc" :state="Number(item.state_val)"></GuangZiPai>
              </div>
            </div>
          </div></div>
        </div>
      </main>
    </ScaleBox>
    <rightClickmenuList v-if="rightMenuObj&&showMenu" :rightMenuObj="rightMenuObj" @menuItemClick="menuItemClick"></rightClickmenuList>
    <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible_0" width="22%" :close-on-click-modal="false">
      <p slot="title" class="el-dialog__title">操作人</p>
      <div class="operatorPwd">
        <div class="operator">
          <label>请输入操作人</label>
          <el-select size="small" v-model="operatorPwdObj.username" style="width: 16rem;">
            <el-option
              v-for="(item,index) in userInfoJson.operatorList"
              :key="index"
              :label="item.username"
              :value="item.username"
            ></el-option>
          </el-select>
        </div>
        <div class="pwd">
          <label>请输入密码</label>
          <el-input v-model="operatorPwdObj.pwd" size="small" type="password"   @keydown.enter.native="operatorPwdSubmit_0"></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit_0">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible_0 = false">取 消</el-button>
			</span>
    </el-dialog>
    <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible" width="22%" :close-on-click-modal="false">
      <p slot="title" class="el-dialog__title">监护人</p>
      <div class="operatorPwd">
        <div class="operator">
          <label>请输入监护人</label>
          <el-select size="small" v-model="adminPwdObj.username" style="width: 16rem;">
            <el-option
              v-for="(item,index) in userInfoJson.adminList"
              :key="index"
              :label="item.username"
              :value="item.username"
            ></el-option>
          </el-select>

        </div>
        <div class="pwd">
          <label>请输入监护员密码</label>
          <el-input v-model="adminPwdObj.pwd" size="small" type="password" @keydown.enter.native="operatorPwdSubmit"></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible = false">取 消</el-button>
			</span>
    </el-dialog>
    <el-dialog
      custom-class="switchPatrolDialog"
      :visible.sync="dialogVisible"
      :close-on-press-escape="true"
      :close-on-click-modal="true"
      :width="`40%`"
      :modal="false"
      @before-close="handleDialogClose"
    >

      <!-- 隔离刀 -->
      <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'gelidao'">

        <!-- 遥控 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
          <p slot="title" class="el-dialog__title">遥控</p>
          <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
        </template>

        <!-- 开关清闪 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
          <p slot="title" class="el-dialog__title">开关清闪</p>
        </template>



        <!-- 挂牌/摘牌 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
          <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
          <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
        </template>

        <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>

          <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
          <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>

				</span>
      </template>

      <!-- 地刀 -->
      <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'didao'">
        <!--          遥控-->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
          <p slot="title" class="el-dialog__title">遥控</p>
          <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
        </template>
        <!-- 开关清闪 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 0">
          <p slot="title" class="el-dialog__title">开关清闪</p>
          <span>暂无内容</span>
        </template>

        <!-- 全站清闪 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 4">
          <p slot="title" class="el-dialog__title">全站清闪</p>
          <span>暂无内容</span>
          <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
        </template>
        <!-- 挂牌/摘牌 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 5">
          <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
          <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
        </template>
        <span slot="footer" class="dialog-footer" >
            <!-- 遥控 按钮 -->					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 0" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>


          <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 5" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
      </template>

      <!-- 断路器 -->
      <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'duanluqi'">
        <!-- 遥控 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
          <p slot="title" class="el-dialog__title">遥控</p>
          <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
        </template>
        <!-- 开关清闪 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
          <p slot="title" class="el-dialog__title">开关清闪</p>
          <span>确定要将{{currentSelectMenuItemObj.currentObj.name}}开关清闪吗？</span>
          <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
        </template>
        <!-- 全站清闪 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 3">
          <p slot="title" class="el-dialog__title">全站清闪</p>
          <span>确定要将全部设备进行清闪吗？</span>
          <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
        </template>

        <!-- 挂牌/摘牌 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
          <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
          <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
        </template>
        <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="clearFlesh">确定</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 3" size="small" @click="clearAll">确定</el-button>
          <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>

          <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
      </template>

      <!-- 把手 -->
      <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'bashou'">
        <!-- 操作 - 弹框 -->
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
          <p slot="title" class="el-dialog__title">操作</p>
          <span>暂无内容</span>
        </template>
        <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 2" size="small" @click="dialogVisible = false">取 消</el-button>

				</span>
      </template>



      <template v-if="currentSelectMenuItemObj&&currentSelectMenuItemObj.type=='ruanyaban'">
        <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
          <p slot="title" class="el-dialog__title">遥控</p>
          <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
        </template>
        <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="dialogVisible = false">取 消</el-button>

          <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
				</span>
      </template>




    </el-dialog>
    <el-dialog ref="operateRecordDialogRef" custom-class="operateRecordDialog" :modal="false" :close-on-click-modal="false" v-if="operationRecordsDialogVisible" :visible.sync="operationRecordsDialogVisible" v-dialogDrag:{dialogDrag}="true" width="35%">
      <p slot="title" class="el-dialog__title">操作记录</p>
      <div class="messageAlarmList">
        <el-table :data="operationRecordsData" width="100%" height="250" >
          <el-table-column prop="num" label="序号" width="85" header-align="center" align="center" >
            <template #default="{row}">
              <span :class="{'is-highlight': !!row.isHighlight}">{{row.num}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" label="操作时间" width="160" header-align="center" align="center" >
            <template #default="{row}">
              <span :class="{'is-highlight': !!row.isHighlight}">{{row.createTime}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="log_desc" label="操作描述" header-align="center" >
            <template #default="{row}">
              <span :class="{'is-highlight': !!row.isHighlight}">{{row.log_desc}}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-dialog>
  </div>
</template>

<style scoped lang="less">
@import "@/assets/css/public";
main {
  height: calc(100% - 90px);
  display: flex;
  justify-content: space-between;
  color: #FFFFFF;
  & > div {
    &:nth-of-type(1) {
     width: 50%;
    }
    &:nth-of-type(2) {
     width: 13%;
    }
    &:last-child {
    width: 33%;
      border-right: none;
    }
  }
}
.p3{
  background-color: rgba(9, 28, 38);
  border-radius: 30px;
  position: relative;
  display: flex;
  justify-content: space-between;
  >div:nth-child(1){
    width: 33%;

  }
  >div:nth-child(2){
    width: 43%;

  }
  >div:last-child{
    width: 24%;
  }
  .gzpTitle{
    color: #fff !important;
    font-size: 16px !important;
  }
}
.p2{
}
.p1{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  >div{
  }
 .p1top{
   height: 73%;
   display: flex;
   width: 100%;
   justify-content: space-between;
   .p1top1{
     border: 1px solid #fff;
     width: 33%;
   }
   .p1top2{
     width: 33%;
     background-color: rgba(5, 23, 38);
     border-radius: 30px;
   }
   .p1top3{
     width: 32%;
    border: 1px solid #fff;
     height: 135%;
     overflow: auto;
   }
 }
  .p1bottom{
    height: 26%;
    display: flex;
    margin-left: -.6rem;
  }
}
.hard-platen-wrapper {
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  width: 20%;
  .hard-platen-inner {
    height: 100%;
    border: 2px solid #FFFFFF;
    position: relative;

  }
  .hard-platen-name {
    text-align: center;
    height: 30px;
    line-height: 30px;
    font-size: 18px;
    border-bottom: 2px solid #FFFFFF;
    padding: 2px;
    position: sticky;
    background-color: #000000;
    top: 1px;
  }
  .hard-platen-item {
    .hard-platen-item-name {
      color: #a9765e;
      font-size: 16px;
      text-align: center;
      padding: 10px;
      border-bottom: 2px solid #FFFFFF;
    }
    .list-item {
      display: flex;
      align-items: center;
      padding: 4px 10px;
      .list-item-svg {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        margin-right: 10px;
        cursor: pointer;
        position: relative;
        svg {
          width: 100%;
          height: 100%;
        }
      }
      .list-item-name {
        flex: 1;
        font-size: 14px;
      }
    }
  }
}

.flexible-platen-wrapper {
  padding: 10px;
  box-sizing: border-box;
  height: 100%;
  .flexible-platen-inner {
    border: 2px solid #FFFFFF;
    height: 100%;
    overflow-y: auto;
    position: relative;
  }
  .flexible-platen-name {
    text-align: center;
    font-size: 18px;
    border-bottom: 2px solid #FFFFFF;
    padding: 4px;
    position: sticky;
    top: 1px;
  }
  .flexible-platen-list {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .flexible-platen-item {
    width:100%;
    border-right: 2px solid #FFFFFF;
    border-top: 2px solid #fff;
    &:nth-of-type(2n) {
      border-right: none;
      border-left: 2px solid #fff;
    }
    &:nth-of-type(3n + 1) {
      .item-name {
        color: #FFFFFF;
      }
      .list-item-name {
        color: #FFFFFF;
      }
    }
    .item-name {
      font-size: 16px;
      text-align: center;
      padding: 8px 10px;
      border-bottom: 2px solid #FFFFFF;
    }
    .list-item {
      display: flex;
      align-items: center;
      border-bottom: 2px solid #FFFFFF;
      padding: 2px 10px;
      .list-item-svg {
        width: 50px;
        height: 25px;
        flex-shrink: 0;
        margin-right: 10px;
        cursor: pointer;
        svg {
          width: 100%;
          height: 100%;
        }
      }
      .list-item-name {
        flex: 1;
        font-size: 14px;
      }
    }
  }
}
.gzpInner{
  padding: 10px;
  .gzpItem{
    .gzpTitle{
      font-size: 22px;
      color: rgba(153, 82, 61);
      text-align: center;
    }
  }
}
.line-wrapper {
  height: 500px;
  padding: 10px 0;
  box-sizing: border-box;
  svg {
    width: 100%;
    height: 100%;
  }
}
.control-handle-wrapper {
  padding: 10px;
  box-sizing: border-box;
  position: absolute;
  top: 580px;
  left: 75px;
  .control-handle-name {
    text-align: center;
    line-height: 30px;
    font-size: 20px;
    border-bottom: none;
    padding: 4px;
  }
  .control-handle-grid {
    width: 100%;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 1fr);
    .control-handle-grid-item {
      border: 1px solid #cccccc;
      height: 100px;
      text-align: center;
      padding: 0px;
      box-sizing: border-box;
      position: relative;
      .svg-wrapper {
        width: 100%;
        height: 70px;
        svg {
          width: 100%;
          height: 100%;
          position: absolute;
          left: 0;
        }
        .rotate {
          transform-origin: center;
        }
        .polygon-icon {
          position: absolute;
          left: 10px;
          top: 36px;
          width: 50px;
          height: 50px;
        }
      }
      .grid-item-name {
        margin-top: 10px;
        font-size: 12px;
      }
    }
  }
}




</style>
